home *** CD-ROM | disk | FTP | other *** search
- #ifdef DOCUMENTATION
- /******************************* DOCZ Header *********************************
- .MODULE zero
- .LIBRARY csub
- .TYPE function
- .APPLICATION memory
- .SYSTEM msdos-s
- .SYSTEM msdos-l
- .SYSTEM vms
- .SYSTEM unix
- .AUTHOR Software Toolz
- .LANGUAGE C
- .DESCRIPTION
- Initialize a buffer with zeroes
- .ARGUMENTS
- char *zero(p,sz)
- char *p; /* (w) points to buffer */
- int sz; /* (r) number of NULLs to fill */
- .NARRATIVE
- This function initializes a buffer or variable with NULLs.
- .RETURNS
- A pointer to the first character past your buffer
- .NOTICE
- Copyright 1989 Software Toolz, Inc. - Atlanta, Georgia
-
- All rights reserved worldwide. This program may not be reproduced,
- transmitted, transcribed, stored in a retrieval system or translated in
- any human or computer language, in any form without the express written
- permission of Software Toolz, Inc.
- .ENDOC END DOCUMENTATION
- *****************************************************************************/
- #endif /* DOCUMENTATION */
-
- #include <stdio.h>
- #include "csub.h"
-
- /*****************************************************************************
- Zero
- *****************************************************************************/
- char *zero(p,sz)
- register char *p; /* (w) points to buffer */
- register int sz; /* (r) number of NULLs to fill */
- {
- while(sz--)
- *(p++) = CHAR_NUL;
- return (p);
- }
-